package com.infnoon.parking.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName abnormal_condition
 */
@TableName(value ="abnormal_condition")
@Data
public class AbnormalCondition implements Serializable {
    /**
     * 
     */
    @TableId
    private String carnumber;

    /**
     * 
     */
    private String phoneNumber;

    /**
     * 
     */
    private String situation_description;

    /**
     * 
     */
    private String picture_link;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AbnormalCondition other = (AbnormalCondition) that;
        return (this.getCarnumber() == null ? other.getCarnumber() == null : this.getCarnumber().equals(other.getCarnumber()))
            && (this.getPhoneNumber() == null ? other.getPhoneNumber() == null : this.getPhoneNumber().equals(other.getPhoneNumber()))
            && (this.getSituation_description() == null ? other.getSituation_description() == null : this.getSituation_description().equals(other.getSituation_description()))
            && (this.getPicture_link() == null ? other.getPicture_link() == null : this.getPicture_link().equals(other.getPicture_link()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCarnumber() == null) ? 0 : getCarnumber().hashCode());
        result = prime * result + ((getPhoneNumber() == null) ? 0 : getPhoneNumber().hashCode());
        result = prime * result + ((getSituation_description() == null) ? 0 : getSituation_description().hashCode());
        result = prime * result + ((getPicture_link() == null) ? 0 : getPicture_link().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", carnumber=").append(carnumber);
        sb.append(", phoneNumber=").append(phoneNumber);
        sb.append(", situation_description=").append(situation_description);
        sb.append(", picture_link=").append(picture_link);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}